<%@page import="com.cyou.qb.face.service.impl.QbOperateServiceImpl"%>
<%@page import="com.cyou.qb.face.service.QbOperateService"%>
<%@page import="com.cyou.qb.face.service.impl.GetGameInfoServiceImpl"%>
<%@page import="com.cyou.qb.face.service.GetGameInfoService"%>
<%@page import="com.cyou.qb.face.service.impl.PassportCheckServiceImpl"%>
<%@page import="com.cyou.qb.face.service.PassportCheckService"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8"%>

<%
Object result=null;
try{
	ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
	PassportCheckService passportCheckService = ac.getBean("QbPassportImpl", PassportCheckService.class);
	GetGameInfoService getGameInfoService=ac.getBean("GetGameInfoServiceImpl",GetGameInfoService.class);
	QbOperateService qbOperateService=ac.getBean("QbOperateImpl",QbOperateService.class);
	String param1=request.getParameter("param1");
	String param2=request.getParameter("param2");
	String param3=request.getParameter("param3");
	String param4=request.getParameter("param4");
	String param5=request.getParameter("param5");
	if("getFrontGameInfo".equalsIgnoreCase(param1)){
		result = getGameInfoService.getFrontGameInfo(param2);
	}
	if("getGameNewsInfo".equalsIgnoreCase(param1)){
		result = getGameInfoService.getGameNameInfo();
	}
	if("getGameVideoInfo".equalsIgnoreCase(param1)){
		result = getGameInfoService.getGameVideoInfo(param2);
	}
	if("getUserInfoCompletion".equalsIgnoreCase(param1)){
		result = passportCheckService.getUserInfoCompletion(Integer.parseInt(param2));
	}
	if("getContactCompletion".equalsIgnoreCase(param1)){
		result = passportCheckService.getContactCompletion(Integer.parseInt(param2));
	}
	
	if("getUserInfo".equalsIgnoreCase(param1)){
		result = passportCheckService.getUserInfo(Integer.parseInt(param2));
	}
	
	if("getUserNickname".equalsIgnoreCase(param1)){
		result = passportCheckService.getUserNickname(Integer.parseInt(param2));
	}
	
	if("getAddressInfo".equalsIgnoreCase(param1)){
		result = passportCheckService.getAddressInfo(Integer.parseInt(param2), param3);
	}
	if("getContact".equalsIgnoreCase(param1)){
		result = passportCheckService.getContact(Integer.parseInt(param2), param3);
	}
	if("plusGb".equalsIgnoreCase(param1)){
		result = qbOperateService.plusGb(param2, Integer.parseInt(param3), Integer.parseInt(param4), param5);
	}
	if("getUserGb".equalsIgnoreCase(param1)){
		result = qbOperateService.getUserGb(param2);
	}
	if("minusGb".equalsIgnoreCase(param1)){
		result = qbOperateService.minusGb(param2, Integer.parseInt(param3), param4, Integer.parseInt(param5));
	}
	
	
	
}catch(Exception e){
	e.printStackTrace();
}
%>

<html>
  <head>
    <title>monitor interface</title>
  </head>
    <body>
		<%=result %>
  </body>
</html>
